$(function(){
    var top = new Top();
    top.init().init();
});



function Top(){
    this.init = function(){
        return TOP;
    };
    
    var TOP = {
        init : function(){
            TOP.listeners.bindEvents();
        },
        listeners : {
            bindEvents : function(){
                $.util.foreachFunction(TOP.listeners, [ "bindEvents" ]);
            },
            bindAppLink : function(){
                $('td.td_index_top_app').click(function(){
                    $.util.initHiddenFormSubmit($('#frm_hidden_app_top'), SYSTEM_DATA.contextPath + '/Index/appInfo/id/' + $(this).attr('a_id') + '.shtml', []);
                });
            },
            bindAppTag : function(){
                $('a.a_app_list_tag').click(function(){
                    $.util.initHiddenFormSubmit($('#frm_hidden_app_top'), SYSTEM_DATA.contextPath + '/Index/appTypeList.shtml', [{
                        'name' : 'type', 
                        'value' : $(this).attr('tag_text')
                    }]);
                });
            }
        },
        funs : {}
    };
}
